/**
 * @summary 模板
 */
(function ($) {
    $.uiTemplate = {
        iconStyle_Pre: 'icon_'
        /**
         * 遮罩模板
         */
        ,
        mask: '<div class="ui_mask"></div>'
        /**
         * 加载模板
         */
        ,
        loading: '<div class="ui_loading_content"><span class="ui_loading_img"></span> <span class="ui_loading_text">正在加载……</span></div>'
        /**
         * 日期组件模板
         */
        ,
        datepicker: {
            iconHtml: '<span class="icon dateIcon"></span>',
            icon: 'icon',
            pickerHtml: '<span class="ui_date_span"></span>',
            pickerSpan: 'span'
        }
        ,
        dateRange: {
            drHtml: '<div><input id="{dr}-start" name="{dr}-start" /><span class="ui_dateRange_img"></span><input /></div>'
        }
        ,
        tooltip: {
            html: '<div tabindex="-1" id="{target}-tip" class="ui_tooltip"><div id="{target}-tipContent" class="ui_tooltip-content"></div><div id="{target}-tipAouter" class="ui_tooltip-arrow-outer"></div><div id="{target}-arrow" class="ui_tooltip-arrow"></div></div>',
            region: {right: 'right', top: 'top', left: 'left', bottom: 'bottom'},
            tip: 'tip', tipAouter: 'tipAouter', arrow: 'arrow', content: 'tipContent'
        }
        /**
         * 面板组件模板
         */
        ,
        panel: {
            html:
            '   <div id="{palID}-header" class="ui_panel_header">' +
            '     <div id="{palID}-icon" class="ui_panel_icon"></div>' +
            '     <div id="{palID}-title" class="ui_panel_title"></div>' +
            '     <div id="{palID}-toolbar" class="ui_panel_toolbar"></div>' +
            '   </div>' +
            '   <div id="{palID}-content" class="ui_panel_content"></div>' +
            '   <div id="{palID}-buttonbar" class="ui_panel_buttonbar"></div>',
            header: 'header',
            icon: 'icon',
            title: 'title',
            toolbar: 'toolbar',
            content: 'content',
            buttonbar: 'buttonbar',
            btnClose: 'close',
            btnMax: 'max',
            btnMax_Icon: 'maxIcon',
            resizeHand: 'resizeHand',
            btnColl: 'coll',
            btnColl_Icon: 'collIcon'
        }
        ,
        pagination: '<div class="ui_pagination">' +
        '<div class="ui_pagination_oper">' +
        '       <select id="{pageID}-pagesize" class="ui_pagination_pagesize"></select>' +
        '       <div class="ui_pagination_sep"></div>' +
        '       <a href="javascript:void(0)" title="首页" id="{pageID}-first" class="ui_pagination_btns ui_pagination_first"></a>' +
        '       <a href="javascript:void(0)" title="上一页" id="{pageID}-prev" class="ui_pagination_btns ui_pagination_prev"></a>' +
        '       <div class="ui_pagination_sep"></div>' +
        '       <div class="ui_pagination_before">第</div>' +
        '       <input id="{pageID}-input" type="text" size="2" value="1" class="ui_pagination_input">' +
        '       <div id="{pageID}-after" class="ui_pagination_after">页，共{pages}页</div></span>' +
        '       <div class="ui_pagination_sep"></div>' +
        '       <a href="javascript:void(0)" title="下一页" id="{pageID}-next" class="ui_pagination_btns ui_pagination_next"></a>' +
        '       <a href="javascript:void(0)" title="末页" id="{pageID}-last" class="ui_pagination_btns ui_pagination_last"></a>' +
        '       <div class="ui_pagination_sep"></div>' +
        '       <a href="javascript:void(0)" title="刷新" id="{pageID}-load" class="ui_pagination_btns ui_pagination_load"></a>' +
        '</div>' +
        '<div id="{pageID}-info" class="ui_pagination_info">共{total}条数据，显示{from}-{to}条</div></div>'
        /**
         * 标签组件模板
         */
        ,
        tabs: {
            html: '<div class="ui_tabs">' +
            '   <div id="{tabs}-header" class="ui_tabs_header">' +
            '       <div id="{tabs}-headerLeft" class="ui_tabs_header_left"></div>' +
            '       <div id="{tabs}-headerRight" class="ui_tabs_header_right"></div>' +
            '       <div id="{tabs}-headerCenter" class="ui_tabs_header_center">' +
            '           <ul id="{tabs}-headerTabs" class="tabs"></ul>' +
            '       </div>' +
            '   </div>' +
            '   <div id="{tabs}-panels" class="ui_tabs_panels"></div>' +
            '</div>',
            tabHtml: '<li id="{tab}-li">' +
            '<a id="{tab}-link" href="javascript:void(0)" class="ui_tab_title">' +
            '   <span id="{tab}-linkIcon"></span>' +
            '   <span id="{tab}-linkTitle" class="ui_tabs_title_span"></span>' +
            '</a>' +
            '<a id="{tab}-tabClose" href="javascript:void(0)" class="ui_tab_close"></a>' +
            '</li>',
            header: 'header',
            headerLeft: 'headerLeft',
            headerRight: 'headerRight',
            headerCenter: 'headerCenter',
            headerTabs: 'headerTabs',
            panels: 'panels',
            tab_li: 'li',
            tab_link: 'link',
            tab_linkIcon: 'linkIcon',
            tab_linkTitle: 'linkTitle',
            tab_close: 'tabClose',
            tabContextMenu: 'contextMenu'
        }
        /**
         * 表单组件模板
         */
        ,
        uiForm: {
            iframe: 'formIframe'
        }
        /**
         * 下拉菜单组件模板
         */
        ,
        uiCombo: {
            html: '<span id="{comboID}-combo" class="ui_combo">' +
            '<input id="{comboID}-text" name="{comboID}_text" type="text" class="ui_combo-text" autocomplete="off">' +
            '<span id="{comboID}-arrow" class="ui_combo-arrow"></span>' +
            '<input id="{comboID}-value" type="hidden" class="ui_combo-value">' +
            '</span>',
            panelHtml: '<div id="{comboID}-panel" class="ui_combo-panel"></div>',
            comboValueHtml: '<input id="{comboID}-value" type="hidden" class="ui_combo-value">',
            combo: 'combo', comboText: 'text', comboArrow: 'arrow', comboValue: 'value', comboPanel: 'panel'
        }
        ,
        uiValidate: {
            lenDiv: 'lenDiv'
        }
        ,
        uiSearchbox: {
            html: '<span id="{search}-span" class="ui_searchbox"><input id="{search}-text" type="text" class="ui_searchbox-text">' +
            '<span id="{search}-btn" class="ui_searchbox-button"></span></span>',
            searchSapn: 'span',
            searchText: 'text',
            searchBtn: 'btn'
        }
        ,
        uiGrid: {
            colresizer: 'colresizer'
        }
        ,
        uiNTOK: {
            NTOK_ID: 'ntko'
        }
        ,
        uiUEditor: {
            editorID: 'editor',
            contentID: 'conent',
            contentHtml: '<div id="{uiUEditor}-conent" class="ui_ueditor_content"></div>',
            editorHtml: '<textarea id="{uiUEditor}-editor"></textarea>'
        }
        ,
        uiCheckbox: {
            cbHtml: '<a id="{uiCheckbox}-cb" class="ui_checkbox"></a>',
            wrapperHtml: '<div id="{uiCheckbox}-wrapper" class="ui_checkbox-wrapper"></div>',
            wrapperID: 'wrapper', cbID: 'cb'
        }
    }
})(jQuery);
